﻿@using DevelopmentKit.Mvc.Menu
@{
    var menu = MenuConfigManger.Instance.Items;
    var action = this.Request.RequestContext.RouteData.Values["action"].ToString().ToLower();
    var contrller = this.Request.RequestContext.RouteData.Values["controller"].ToString().ToLower(); 
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />  
    <link href="@Url.Content("~/Content/reset.css")" rel="stylesheet" />
   
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" /> 

    @Styles.Render("~/Content/themes/base/css")
</head>
<body>
    <div id="wrapper">
      
     <div id="header">
        <div class="logo"></div> 
    </div>
      
    <ul id="mainNav">
        @foreach (var item in menu)
        {
            var paras = new RouteValueDictionary();
            var attrs = new Dictionary<string, object>();
            if (null != item.Parameters)
            {
                foreach (var para in item.Parameters)
                {
                    paras.Add(para.Name, para.Value);
                }
            }
            if ((action == item.Action && contrller == item.Contrller) || (null != item.Items && item.Items.Any(m => action == m.Action && contrller == m.Contrller)) || (null != item.Items && item.Items.Any(m => null != m.Items && m.Items.Any(x => action == x.Action && contrller == x.Contrller))))
            {
                attrs.Add("class", "active"); 
            }

            <li>@Html.ActionLink(item.Name, item.Action, item.Contrller, paras, attrs)</li>
        } 
    </ul> 
         <div id="containerHolder">
			<div id="container">
        		 
                    @RenderBody() 
                <div class="clear"></div>
            </div>
           
        </div>	
       

        <div class="footer">欢迎使用系统. <a href="@Url.Action("Create", "Bug")">问题反馈?</a></div>

    @Scripts.Render("~/bundles/jquery")

    @System.Web.Optimization.Scripts.Render("~/bundles/jqueryval")

    @System.Web.Optimization.Scripts.Render("~/bundles/jqueryui")
    @RenderSection("scripts", required: false)
        <script type="text/javascript">

            $(function () {
                $("input.dataselect").live("focus", function () {
                    $(this).datepicker();
                });


            })</script>

    </div>
</body>
</html>
